﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataAccess;
using System.Data;

namespace Bussiness {
    public class PartnershipBuss {
        public DataTable getPartnerships(int partnerID) {
            PartnershipRepository repository = new PartnershipRepository();
            return repository.getPartnerships(partnerID);
        }

        /// <summary>
        /// add partnerships
        /// </summary>
        /// <param name="partnerID"></param>
        /// <param name="productID"></param>
        /// <param name="beginDate"></param>
        /// <param name="endDate"></param>
        /// <param name="minQuanlity"></param>
        /// <param name="nextTransQuanlity"></param>
        /// <param name="state"></param>
        /// <returns>insert id</returns>
        public int add(int partnerID, int productID, DateTime beginDate, DateTime endDate, int minQuanlity, int nextTransQuanlity, int state = 0) {
            PartnershipRepository repository = new PartnershipRepository();
            return repository.add(partnerID, productID, beginDate, endDate, minQuanlity, nextTransQuanlity, state);
        }
    }
}
